package desi.bakar.coreservice;


import com.fasterxml.jackson.databind.ObjectMapper;
import desi.bakar.domain.Subject;

import java.io.File;
import java.io.IOException;
import java.util.LinkedHashMap;

public class EntityService {



    public void addEntity(String json){


    }



   public static void main(String args[]) throws IOException, ClassNotFoundException {

       ObjectMapper objectMapper =new ObjectMapper();
       LinkedHashMap<String,Object> linkedHashMap = (LinkedHashMap<String, Object>) objectMapper.readValue(new File("sub.json"), Object.class);
       //TODO load class name from class path..
       Subject subject= objectMapper.convertValue(linkedHashMap , Subject.class);
       System.out.print(subject.getName());



   }

}
